from _datetime import datetime
import time

from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.schedulers.blocking import BlockingScheduler


def job(i):
    tt = datetime.now()
    print(f'start{i} {tt}')
    # for u in range(1, 50000000):
    #     bm = 1
    print(f'end{str(i)} {tt}')

def fob(i):
    tt = datetime.now()
    print(f'start{i} {tt}')
    # for u in range(1, 10000000):
    #     bm = 1
    print(f'end{str(i)} {tt}')

if __name__ == '__main__':
    scheduler = BlockingScheduler()
    scheduler.add_job(job, 'interval', seconds=0.01,args=[1],max_instances=3)
    scheduler.add_job(fob, 'interval', seconds=0.01,args=[2])
    scheduler.start()
    # time.sleep(100)
